import rxAjax from '@/assets/js/ajax.js';

//接口分类表 api接口
export const SysInterfaceClassificationApi = {};

SysInterfaceClassificationApi.baseUrl= '/api-system/system/core/sysInterfaceClassification';
SysInterfaceClassificationApi.exportUrl= SysInterfaceClassificationApi.baseUrl + '/listExport';

//查询列表
SysInterfaceClassificationApi.query=function (parameter) {
  var url= SysInterfaceClassificationApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

SysInterfaceClassificationApi.queryByProjectId=function(projectId){
    var url = SysInterfaceClassificationApi.baseUrl + '/queryByProjectId?projectId='+projectId;
    return rxAjax.get(url);
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
SysInterfaceClassificationApi.get =function(pkId) {
  var url= SysInterfaceClassificationApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
SysInterfaceClassificationApi.save =function(parameter) {
  var url= SysInterfaceClassificationApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
SysInterfaceClassificationApi.del =function(parameter) {
  var url= SysInterfaceClassificationApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

export  default SysInterfaceClassificationApi;

